Skip to content

Fix output formatting differences between JRuby and Ruby when converting Float to JSON#936

Closed
evaniainbrooks wants to merge 1 commit into
ruby:masterfrom
evaniainbrooks:817-use-formatFloat
Closed

Fix output formatting differences between JRuby and Ruby when converting Float to JSON#936
evaniainbrooks wants to merge 1 commit into
ruby:masterfrom
evaniainbrooks:817-use-formatFloat

Conversation

@evaniainbrooks

Copy link
Copy Markdown

issue #817

@byroot byroot requested a review from headius February 7, 2026 08:29
@evaniainbrooks

Copy link
Copy Markdown
Author

It appears this needs to wait for a new version of JRuby 9.4 to be released.

@headius

headius commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

We will need to patch this to use the old logic on older JRuby versions or it will break for users on any version other than 10.0.3.0. I will suggest a change.

@headius headius closed this Feb 8, 2026
@evaniainbrooks

Copy link
Copy Markdown
Author

@headius I don't mind following up on this again. If you have a moment, let me know what you want to see and I will give it a go.

  • In a static initialization block, set a flag/MethodHandle to switch on the new implementation
  • Use a ThreadLocal scratch buffer for the tmp ByteList instead
  • Optimize the old path, remove some uncessary allocations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants